// GrandiaX Mana Egg Table Generator.h : main header file for the GrandiaX MANA EGG TABLE GENERATOR application
//

#if !defined(AFX_GrandiaXMANAEGGTABLEGENERATOR_H__B09D4E2D_2C5C_426F_A985_29DFD5C347E2__INCLUDED_)
#define AFX_GrandiaXMANAEGGTABLEGENERATOR_H__B09D4E2D_2C5C_426F_A985_29DFD5C347E2__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#ifndef __AFXWIN_H__
	#error include 'stdafx.h' before including this file for PCH
#endif

#include "resource.h"       // main symbols
#include "selfupdate.h"
/////////////////////////////////////////////////////////////////////////////
// CGrandiaXManaEggTableGeneratorApp:
// See GrandiaX Mana Egg Table Generator.cpp for the implementation of this class
//

#include "GrandiaX Mana Egg Live SF Modifier.h"

enum 
{
    kmNone = 0,
    kmCtrl = 1,
    kmShift = 2,
    kmCtrlShift = 3
};

class CToolTipCtrlEx:public CToolTipCtrl
{
public:
    BOOL Addt(HWND hWnd, LPCTSTR str);
};

int EditToInt(CEdit &Edit);

class CGrandiaXManaEggTableGeneratorApp : public CWinApp
{
public:
	CGrandiaXManaEggTableGeneratorApp();

	const MANAEGG_INTERNAL_TABLE* GetOriginalMagicData(int Egg) const;
    const MAGIC_INTERNAL_DATA* GetOriginalMagicDesc(int Magic) const;
    const EFFECT_INTERNAL_DATA* GetOriginalEffect(int Magic) const;
    const SPECIAL_HEADER* GetOriginalMagicHeader(int Magic) const;

    void GetOriginalSpecialData(const SPECIAL_HEADER** Header,
        const SPECIAL_DEF** Def, const SPECIAL_DETAIL** Details) const;

    void GetOriginalCombiData(const SPECIAL_HEADER** Header,
        const SPECIAL_DEF** Def, const SPECIAL_DETAIL** Details) const;

    const MOVE_SKILLUP* GetOriginalMoveLevelUpData(int Move) const;

    void CheckUpdate(SELFUPDATE_CALLBACK OnUpdateNotFound);

protected:
	MANAEGG_INTERNAL_TABLE* ManaEggsRom;
    SPECIAL_HEADER* MagicHdrRom;
    MAGIC_INTERNAL_DATA* MagicsRom;
    EFFECT_INTERNAL_DATA* EffectsRom;

    SPECIAL_HEADER* SpecialHdrRom;
    SPECIAL_DEF* SpecialDefRom;
    SPECIAL_DETAIL* SpecialDetailRom;

    SPECIAL_HEADER* CombiHdrRom;
    SPECIAL_DEF* CombiDefRom;
    SPECIAL_DETAIL* CombiDetailRom;

    MOVE_SKILLUP* MoveSkillUpRom;
// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CGrandiaXManaEggTableGeneratorApp)
	public:
	virtual BOOL InitInstance();
	//}}AFX_VIRTUAL

// Implementation
	//{{AFX_MSG(CGrandiaXManaEggTableGeneratorApp)
	afx_msg void OnAppAbout();
	afx_msg void OnFileOpen();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};


class CReplaceDlg : public CDialog
{
public:
    CReplaceDlg();

    // Dialog Data
    //{{AFX_DATA(CAboutDlg)
    enum { IDD = IDD_REPLACEBOX };
    //}}AFX_DATA

    void SetValue(int Value);
    int GetValue();

    // ClassWizard generated virtual function overrides
    //{{AFX_VIRTUAL(CAboutDlg)
protected:
    int Value;
  //  virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
    //}}AFX_VIRTUAL

    // Implementation
protected:
    //{{AFX_MSG(CAboutDlg)
    afx_msg void OnReplace();
    //}}AFX_MSG
    DECLARE_MESSAGE_MAP()
public:
//    afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
//    virtual INT_PTR DoModal();
    virtual BOOL OnInitDialog();
};


/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_GrandiaXMANAEGGTABLEGENERATOR_H__B09D4E2D_2C5C_426F_A985_29DFD5C347E2__INCLUDED_)
